﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using woaC2.SocketLib;

namespace woaPoker.LogicLib.LogicCtrl
{
    public class Match
    {
        internal Match(Player player, int type, string pass,string matchName)
        {
            //this.idBoss = player.client.SessionID;
            this.sessionIdMatch = player.client.SessionID;
            if (type == 1)
            {
                //this.listPlayer1.Add(player);
                listPlayer1 = new List<Player>();
                listPlayer1.Add(player);
                listPlayer2 = new List<Player>();
            }
            else
            {
                //this.listPlayer2.Add(player);
                listPlayer1 = new List<Player>();
                listPlayer2 = new List<Player>();
                listPlayer2.Add(player);
            }
            this.status = false;
            this.pass = pass;
            this.MatchName = matchName;
        }
        //internal Guid idBoss { set; get; }
        internal string MatchName { set; get; }
        internal Guid sessionIdMatch { set; get; }
        internal List<Player> listPlayer1{set; get;}
        internal List<Player> listPlayer2{set; get;}
        public bool status { set; get; }
        public string pass { set; get; }


        internal void AddClient(Player player, int type)
        {
            if (type == 1)
            {
                listPlayer1.Add(player);
            }
            else listPlayer2.Add(player);
        }

        internal bool GameStart()
        {
            this.status = true;
            return status;
        }



    }
}
